<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>bbs club</title>
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/css/style.css">
    <link rel="stylesheet" href="/static/lib/editor/editor.css">
    <link rel="stylesheet" href="/static/lib/webuploader/webuploader.css">
    <script src="/static/lib/jquery-3.0.0.min.js"></script>
    <script src="/static/lib/markdownit.js"></script>
    <script src="/static/lib/webuploader/webuploader.withoutimage.js"></script>
    <script src="/static/lib/editor/editor.js"></script>
    <script src="/static/lib/editor/ext.js"></script>
</head>
<body>
<div id="main">
    <div id="content">
        <div class="panel">
            <div class="header topic_header">
                <span class="topic_full_title">{{topic.title}}</span>
                <div class="changes">
                    <span>发布于2天前</span>
                    <span>作者<a href="/user/juran">juran</a></span>
                    <span>
                            <span>{{topic.views}} 次浏览</span>
                            <span>来自回答</span>
                        </span>
                </div>
            </div>
            <div class="inner topic">
                <div class="topic_content">
                    <div class="markdown-text">
                        {{topic.content}}
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="panel">
        <div class="header">
                <span>
                    {{topic.replies()|count}}回复
                </span>
        </div>
        {% for r in topic.replies() %}
        <div class="cell reply_area reply_item">
            <div class="author_content">
                <a href="/user/juran" class="user_avatar">
                    <img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F02b4df556d6af10000016b624bf486.jpg%40800w_1l&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638587678&t=dd0b300b753436e54fe62f48205862a2" title="{{r.user().username}}"/>
                </a>
                <div class="user_info">
                    <a class="dark reply_author">
                        {{r.user().username}}
                    </a>
                    <a class="reply_time">
                        {{loop.index}}楼 , 2天前
                    </a>
                </div>
                <div class="user_action">
                        <span>
                            <i class="fa up_btn fa-thumbs-o-up invisible" title="喜欢"></i>
                            <span class="up-count"></span>
                        </span>
                </div>
            </div>
            <div class="reply_content from-juran">
                <div class="markdown-text">
                    {{r.content}}
                </div>
            </div>
        </div>
        {% endfor %}
        <div>
            <form action="{{url_for('reply.add')}}" method="post">
                <input type="hidden" name="topic_id" value="{{topic.id}}">
                <textarea name="content"></textarea>
                <button>添加回复</button>
            </form>
        </div>
    </div>
</div>
</body>
</html>